<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="drivelabels_v2.html">Drive Labels API</a> . <a href="drivelabels_v2.labels.html">labels</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="drivelabels_v2.labels.locks.html">locks()</a></code>
</p>
<p class="firstline">Returns the locks Resource.</p>

<p class="toc_element">
  <code><a href="drivelabels_v2.labels.permissions.html">permissions()</a></code>
</p>
<p class="firstline">Returns the permissions Resource.</p>

<p class="toc_element">
  <code><a href="drivelabels_v2.labels.revisions.html">revisions()</a></code>
</p>
<p class="firstline">Returns the revisions Resource.</p>

<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#create">create(body=None, languageCode=None, useAdminAccess=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates a label. For more information, see [Create and publish a label](https://developers.google.com/workspace/drive/labels/guides/create-label).</p>
<p class="toc_element">
  <code><a href="#delete">delete(name, useAdminAccess=None, writeControl_requiredRevisionId=None, x__xgafv=None)</a></code></p>
<p class="firstline">Permanently deletes a label and related metadata on Drive items. For more information, see [Disable, enable, and delete a label](https://developers.google.com/workspace/drive/labels/guides/disable-delete-label). Once deleted, the label and related Drive item metadata will be deleted. Only draft labels and disabled labels may be deleted.</p>
<p class="toc_element">
  <code><a href="#delta">delta(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates a single label by applying a set of update requests resulting in a new draft revision. For more information, see [Update a label](https://developers.google.com/workspace/drive/labels/guides/update-label). The batch update is all-or-nothing: If any of the update requests are invalid, no changes are applied. The resulting draft revision must be published before the changes may be used with Drive items.</p>
<p class="toc_element">
  <code><a href="#disable">disable(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Disable a published label. For more information, see [Disable, enable, and delete a label](https://developers.google.com/workspace/drive/labels/guides/disable-delete-label). Disabling a label will result in a new disabled published revision based on the current published revision. If there's a draft revision, a new disabled draft revision will be created based on the latest draft revision. Older draft revisions will be deleted. Once disabled, a label may be deleted with `DeleteLabel`.</p>
<p class="toc_element">
  <code><a href="#enable">enable(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Enable a disabled label and restore it to its published state. For more information, see [Disable, enable, and delete a label](https://developers.google.com/workspace/drive/labels/guides/disable-delete-label). This will result in a new published revision based on the current disabled published revision. If there's an existing disabled draft revision, a new revision will be created based on that draft and will be enabled.</p>
<p class="toc_element">
  <code><a href="#get">get(name, languageCode=None, useAdminAccess=None, view=None, x__xgafv=None)</a></code></p>
<p class="firstline">Get a label by its resource name. For more information, see [Search for labels](https://developers.google.com/workspace/drive/labels/guides/search-label). Resource name may be any of: * `labels/{id}` - See `labels/{id}@latest` * `labels/{id}@latest` - Gets the latest revision of the label. * `labels/{id}@published` - Gets the current published revision of the label. * `labels/{id}@{revision_id}` - Gets the label at the specified revision ID.</p>
<p class="toc_element">
  <code><a href="#list">list(customer=None, languageCode=None, minimumRole=None, pageSize=None, pageToken=None, publishedOnly=None, useAdminAccess=None, view=None, x__xgafv=None)</a></code></p>
<p class="firstline">List labels. For more information, see [Search for labels](https://developers.google.com/workspace/drive/labels/guides/search-label).</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
  <code><a href="#publish">publish(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Publish all draft changes to the label. Once published, the label may not return to its draft state. For more information, see [Create and publish a label](https://developers.google.com/workspace/drive/labels/guides/create-label). Publishing a label will result in a new published revision. All previous draft revisions will be deleted. Previous published revisions will be kept but are subject to automated deletion as needed. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). Once published, some changes are no longer permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label will be rejected. For example, the following changes to a label will be rejected after the label is published: * The label cannot be directly deleted. It must be disabled first, then deleted. * `Field.FieldType` cannot be changed. * Changes to field validation options cannot reject something that was previously accepted. * Reducing the maximum entries.</p>
<p class="toc_element">
  <code><a href="#updateLabelCopyMode">updateLabelCopyMode(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates a label's `CopyMode`. Changes to this policy aren't revisioned, don't require publishing, and take effect immediately.</p>
<p class="toc_element">
  <code><a href="#updateLabelEnabledAppSettings">updateLabelEnabledAppSettings(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates a label's `EnabledAppSettings`. Enabling a label in a Google Workspace app allows it to be used in that app. This change isn't revisioned, doesn't require publishing, and takes effect immediately.</p>
<p class="toc_element">
  <code><a href="#updatePermissions">updatePermissions(parent, body=None, useAdminAccess=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates a label's permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="create">create(body=None, languageCode=None, useAdminAccess=None, x__xgafv=None)</code>
  <pre>Creates a label. For more information, see [Create and publish a label](https://developers.google.com/workspace/drive/labels/guides/create-label).

Args:
  body: object, The request body.
    The object takes the form of:

{ # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  &quot;appliedCapabilities&quot;: { # The capabilities a user has on this label&#x27;s applied metadata. # Output only. The capabilities related to this label on applied metadata.
    &quot;canApply&quot;: True or False, # Whether the user can apply this label to items.
    &quot;canRead&quot;: True or False, # Whether the user can read applied metadata related to this label.
    &quot;canRemove&quot;: True or False, # Whether the user can remove this label from items.
  },
  &quot;appliedLabelPolicy&quot;: { # Behavior of this label when it&#x27;s applied to Drive items. # Output only. Behavior of this label when it&#x27;s applied to Drive items.
    &quot;copyMode&quot;: &quot;A String&quot;, # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this label was created.
  &quot;creator&quot;: { # Information about a user. # Output only. The user who created this label.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;customer&quot;: &quot;A String&quot;, # Output only. The customer this label belongs to. For example: `customers/123abc789`.
  &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this label was disabled. This value has no meaning when the label isn&#x27;t disabled.
  &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label isn&#x27;t disabled.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;displayHints&quot;: { # The UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    &quot;disabled&quot;: True or False, # Whether the label should be shown in the UI as disabled.
    &quot;hiddenInSearch&quot;: True or False, # This label should be hidden in the search menu when searching for Drive items.
    &quot;priority&quot;: &quot;A String&quot;, # The order to display labels in a list.
    &quot;shownInApply&quot;: True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  &quot;enabledAppSettings&quot;: { # Describes the Google Workspace apps in which the label can be used. # Optional. The `EnabledAppSettings` for this Label.
    &quot;enabledApps&quot;: [ # Optional. The list of apps where the label can be used.
      { # An app where the label can be used.
        &quot;app&quot;: &quot;A String&quot;, # Optional. The name of the app.
      },
    ],
  },
  &quot;fields&quot;: [ # List of fields in descending priority order.
    { # Defines a field that has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item.
      &quot;appliedCapabilities&quot;: { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
        &quot;canSearch&quot;: True or False, # Whether the user can search for Drive items referencing this field.
        &quot;canWrite&quot;: True or False, # Whether the user can set this field on Drive items.
      },
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this field was created.
      &quot;creator&quot;: { # Information about a user. # Output only. The user who created this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;dateOptions&quot;: { # Options for the date field type. # Date field options.
        &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
        &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
        &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;displayHints&quot;: { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        &quot;disabled&quot;: True or False, # Whether the field should be shown in the UI as disabled.
        &quot;hiddenInSearch&quot;: True or False, # This field should be hidden in the search menu when searching for Drive items.
        &quot;required&quot;: True or False, # Whether the field should be shown as required in the UI.
        &quot;shownInApply&quot;: True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      &quot;id&quot;: &quot;A String&quot;, # Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
      &quot;integerOptions&quot;: { # Options for the Integer field type. # Integer field options.
        &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
        &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
      },
      &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle of this field.
        &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
          &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
        },
        &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
      },
      &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this field.
        &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
      },
      &quot;properties&quot;: { # The basic properties of the field. # The basic properties of the field.
        &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
        &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
        &quot;required&quot;: True or False, # Whether the field should be marked as required.
      },
      &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;queryKey&quot;: &quot;A String&quot;, # Output only. The key to use when constructing Drive search queries to find files based on values defined for this field on files. For example, &quot;`{query_key}` &gt; 2001-01-01&quot;.
      &quot;schemaCapabilities&quot;: { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        &quot;canDelete&quot;: True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        &quot;canDisable&quot;: True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        &quot;canEnable&quot;: True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        &quot;canUpdate&quot;: True or False, # Whether the user can change this field.
      },
      &quot;selectionOptions&quot;: { # Options for the selection field type. # Selection field options.
        &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
              &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
              &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
            },
            &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
            &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
              &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
              &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
              &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
              &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
              },
              &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
            },
            &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
              &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
            },
            &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
              &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              &quot;description&quot;: &quot;A String&quot;, # The description of this label.
              &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
              &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
              &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
              &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
              &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
            },
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
            &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
          },
        ],
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
      &quot;textOptions&quot;: { # Options for the Text field type. # Text field options.
        &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
        &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
      },
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this field was updated.
      &quot;updater&quot;: { # Information about a user. # Output only. The user who modified this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;userOptions&quot;: { # Options for the user field type. # User field options.
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  &quot;id&quot;: &quot;A String&quot;, # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;labelType&quot;: &quot;A String&quot;, # Required. The type of label.
  &quot;learnMoreUri&quot;: &quot;A String&quot;, # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle state of the label including whether it&#x27;s published, deprecated, and has draft changes.
    &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
      &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
    },
    &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
  },
  &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this label.
    &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  &quot;properties&quot;: { # Basic properties of the label. # Required. The basic properties of the label.
    &quot;description&quot;: &quot;A String&quot;, # The description of the label.
    &quot;title&quot;: &quot;A String&quot;, # Required. Title of the label.
  },
  &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this label was published. This value has no meaning when the label isn&#x27;t published.
  &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label isn&#x27;t published.&gt;&gt;
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The time this label revision was created.
  &quot;revisionCreator&quot;: { # Information about a user. # Output only. The user who created this label revision.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionId&quot;: &quot;A String&quot;, # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;schemaCapabilities&quot;: { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    &quot;canDelete&quot;: True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    &quot;canDisable&quot;: True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    &quot;canEnable&quot;: True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    &quot;canUpdate&quot;: True or False, # Whether the user can change this label.
  },
}

  languageCode: string, The BCP-47 language code to use for evaluating localized field labels in response. When not specified, values in the default configured language will be used.
  useAdminAccess: boolean, Set to `true` in order to use the user&#x27;s admin privileges. The server will verify the user is an admin before allowing access.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  &quot;appliedCapabilities&quot;: { # The capabilities a user has on this label&#x27;s applied metadata. # Output only. The capabilities related to this label on applied metadata.
    &quot;canApply&quot;: True or False, # Whether the user can apply this label to items.
    &quot;canRead&quot;: True or False, # Whether the user can read applied metadata related to this label.
    &quot;canRemove&quot;: True or False, # Whether the user can remove this label from items.
  },
  &quot;appliedLabelPolicy&quot;: { # Behavior of this label when it&#x27;s applied to Drive items. # Output only. Behavior of this label when it&#x27;s applied to Drive items.
    &quot;copyMode&quot;: &quot;A String&quot;, # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this label was created.
  &quot;creator&quot;: { # Information about a user. # Output only. The user who created this label.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;customer&quot;: &quot;A String&quot;, # Output only. The customer this label belongs to. For example: `customers/123abc789`.
  &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this label was disabled. This value has no meaning when the label isn&#x27;t disabled.
  &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label isn&#x27;t disabled.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;displayHints&quot;: { # The UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    &quot;disabled&quot;: True or False, # Whether the label should be shown in the UI as disabled.
    &quot;hiddenInSearch&quot;: True or False, # This label should be hidden in the search menu when searching for Drive items.
    &quot;priority&quot;: &quot;A String&quot;, # The order to display labels in a list.
    &quot;shownInApply&quot;: True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  &quot;enabledAppSettings&quot;: { # Describes the Google Workspace apps in which the label can be used. # Optional. The `EnabledAppSettings` for this Label.
    &quot;enabledApps&quot;: [ # Optional. The list of apps where the label can be used.
      { # An app where the label can be used.
        &quot;app&quot;: &quot;A String&quot;, # Optional. The name of the app.
      },
    ],
  },
  &quot;fields&quot;: [ # List of fields in descending priority order.
    { # Defines a field that has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item.
      &quot;appliedCapabilities&quot;: { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
        &quot;canSearch&quot;: True or False, # Whether the user can search for Drive items referencing this field.
        &quot;canWrite&quot;: True or False, # Whether the user can set this field on Drive items.
      },
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this field was created.
      &quot;creator&quot;: { # Information about a user. # Output only. The user who created this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;dateOptions&quot;: { # Options for the date field type. # Date field options.
        &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
        &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
        &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;displayHints&quot;: { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        &quot;disabled&quot;: True or False, # Whether the field should be shown in the UI as disabled.
        &quot;hiddenInSearch&quot;: True or False, # This field should be hidden in the search menu when searching for Drive items.
        &quot;required&quot;: True or False, # Whether the field should be shown as required in the UI.
        &quot;shownInApply&quot;: True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      &quot;id&quot;: &quot;A String&quot;, # Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
      &quot;integerOptions&quot;: { # Options for the Integer field type. # Integer field options.
        &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
        &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
      },
      &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle of this field.
        &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
          &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
        },
        &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
      },
      &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this field.
        &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
      },
      &quot;properties&quot;: { # The basic properties of the field. # The basic properties of the field.
        &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
        &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
        &quot;required&quot;: True or False, # Whether the field should be marked as required.
      },
      &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;queryKey&quot;: &quot;A String&quot;, # Output only. The key to use when constructing Drive search queries to find files based on values defined for this field on files. For example, &quot;`{query_key}` &gt; 2001-01-01&quot;.
      &quot;schemaCapabilities&quot;: { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        &quot;canDelete&quot;: True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        &quot;canDisable&quot;: True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        &quot;canEnable&quot;: True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        &quot;canUpdate&quot;: True or False, # Whether the user can change this field.
      },
      &quot;selectionOptions&quot;: { # Options for the selection field type. # Selection field options.
        &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
              &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
              &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
            },
            &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
            &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
              &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
              &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
              &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
              &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
              },
              &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
            },
            &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
              &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
            },
            &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
              &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              &quot;description&quot;: &quot;A String&quot;, # The description of this label.
              &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
              &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
              &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
              &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
              &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
            },
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
            &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
          },
        ],
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
      &quot;textOptions&quot;: { # Options for the Text field type. # Text field options.
        &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
        &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
      },
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this field was updated.
      &quot;updater&quot;: { # Information about a user. # Output only. The user who modified this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;userOptions&quot;: { # Options for the user field type. # User field options.
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  &quot;id&quot;: &quot;A String&quot;, # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;labelType&quot;: &quot;A String&quot;, # Required. The type of label.
  &quot;learnMoreUri&quot;: &quot;A String&quot;, # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle state of the label including whether it&#x27;s published, deprecated, and has draft changes.
    &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
      &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
    },
    &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
  },
  &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this label.
    &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  &quot;properties&quot;: { # Basic properties of the label. # Required. The basic properties of the label.
    &quot;description&quot;: &quot;A String&quot;, # The description of the label.
    &quot;title&quot;: &quot;A String&quot;, # Required. Title of the label.
  },
  &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this label was published. This value has no meaning when the label isn&#x27;t published.
  &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label isn&#x27;t published.&gt;&gt;
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The time this label revision was created.
  &quot;revisionCreator&quot;: { # Information about a user. # Output only. The user who created this label revision.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionId&quot;: &quot;A String&quot;, # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;schemaCapabilities&quot;: { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    &quot;canDelete&quot;: True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    &quot;canDisable&quot;: True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    &quot;canEnable&quot;: True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    &quot;canUpdate&quot;: True or False, # Whether the user can change this label.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="delete">delete(name, useAdminAccess=None, writeControl_requiredRevisionId=None, x__xgafv=None)</code>
  <pre>Permanently deletes a label and related metadata on Drive items. For more information, see [Disable, enable, and delete a label](https://developers.google.com/workspace/drive/labels/guides/disable-delete-label). Once deleted, the label and related Drive item metadata will be deleted. Only draft labels and disabled labels may be deleted.

Args:
  name: string, Required. Label resource name. (required)
  useAdminAccess: boolean, Set to `true` in order to use the user&#x27;s admin credentials. The server will verify the user is an admin for the label before allowing access.
  writeControl_requiredRevisionId: string, The revision ID of the label that the write request will be applied to. If this isn&#x27;t the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}</pre>
</div>

<div class="method">
    <code class="details" id="delta">delta(name, body=None, x__xgafv=None)</code>
  <pre>Updates a single label by applying a set of update requests resulting in a new draft revision. For more information, see [Update a label](https://developers.google.com/workspace/drive/labels/guides/update-label). The batch update is all-or-nothing: If any of the update requests are invalid, no changes are applied. The resulting draft revision must be published before the changes may be used with Drive items.

Args:
  name: string, Required. The resource name of the label to update. (required)
  body: object, The request body.
    The object takes the form of:

{ # The set of requests for updating aspects of a label. If any request isn&#x27;t valid, no requests will be applied.
  &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code to use for evaluating localized field labels when `include_label_in_response` is `true`.
  &quot;requests&quot;: [ # A list of updates to apply to the label. Requests will be applied in the order they are specified.
    { # A single kind of update to apply to a label.
      &quot;createField&quot;: { # Request to create a field within a label. # Creates a field.
        &quot;field&quot;: { # Defines a field that has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item. # Required. Field to create.
          &quot;appliedCapabilities&quot;: { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
            &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
            &quot;canSearch&quot;: True or False, # Whether the user can search for Drive items referencing this field.
            &quot;canWrite&quot;: True or False, # Whether the user can set this field on Drive items.
          },
          &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this field was created.
          &quot;creator&quot;: { # Information about a user. # Output only. The user who created this field.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
          &quot;dateOptions&quot;: { # Options for the date field type. # Date field options.
            &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
            &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
            &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
              &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
              &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
            &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
              &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
              &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
          },
          &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
          &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
          &quot;displayHints&quot;: { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
            &quot;disabled&quot;: True or False, # Whether the field should be shown in the UI as disabled.
            &quot;hiddenInSearch&quot;: True or False, # This field should be hidden in the search menu when searching for Drive items.
            &quot;required&quot;: True or False, # Whether the field should be shown as required in the UI.
            &quot;shownInApply&quot;: True or False, # This field should be shown in the apply menu when applying values to a Drive item.
          },
          &quot;id&quot;: &quot;A String&quot;, # Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
          &quot;integerOptions&quot;: { # Options for the Integer field type. # Integer field options.
            &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
            &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
          },
          &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle of this field.
            &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
              &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
              &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
            },
            &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
            &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
          },
          &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this field.
            &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
          },
          &quot;properties&quot;: { # The basic properties of the field. # The basic properties of the field.
            &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
            &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
            &quot;required&quot;: True or False, # Whether the field should be marked as required.
          },
          &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
          &quot;queryKey&quot;: &quot;A String&quot;, # Output only. The key to use when constructing Drive search queries to find files based on values defined for this field on files. For example, &quot;`{query_key}` &gt; 2001-01-01&quot;.
          &quot;schemaCapabilities&quot;: { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
            &quot;canDelete&quot;: True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
            &quot;canDisable&quot;: True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
            &quot;canEnable&quot;: True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
            &quot;canUpdate&quot;: True or False, # Whether the user can change this field.
          },
          &quot;selectionOptions&quot;: { # Options for the selection field type. # Selection field options.
            &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
              { # Selection field choice.
                &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
                  &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
                  &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
                  &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
                },
                &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
                &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
                  &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
                },
                &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
                &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
                  &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
                },
                &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
                  &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                    &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                  },
                  &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
                  &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                    &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                  },
                  &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
                  &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
                  &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
                },
                &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
                &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
                  &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                    &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                    &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
                  },
                  &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
                  &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
                },
                &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
                  &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
                },
                &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
                  &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                    &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
                  },
                  &quot;description&quot;: &quot;A String&quot;, # The description of this label.
                  &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
                  &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
                },
                &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
                &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
                  &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
                },
                &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
                  &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
                  &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
                  &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
                  &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
                },
                &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
                &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
                  &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
                },
              },
            ],
            &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
              &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
            },
          },
          &quot;textOptions&quot;: { # Options for the Text field type. # Text field options.
            &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
            &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
          },
          &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this field was updated.
          &quot;updater&quot;: { # Information about a user. # Output only. The user who modified this field.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
          &quot;userOptions&quot;: { # Options for the user field type. # User field options.
            &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
              &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
            },
          },
        },
      },
      &quot;createSelectionChoice&quot;: { # Request to create a selection choice. # Create a choice within a selection field.
        &quot;choice&quot;: { # Selection field choice. # Required. The choice to create.
          &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
            &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
            &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
            &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
          },
          &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
          &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
          &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
          &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
          &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
            &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
              &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
            },
            &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
            &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
              &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
            },
            &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
            &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
            &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
          },
          &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
          &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
            &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
              &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
              &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
            },
            &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
            &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
          },
          &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
            &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
          },
          &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
            &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
              &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
            },
            &quot;description&quot;: &quot;A String&quot;, # The description of this label.
            &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
            &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
          },
          &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
          &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
          &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
            &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
            &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
            &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
            &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
          },
          &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
          &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
        },
        &quot;fieldId&quot;: &quot;A String&quot;, # Required. The selection field in which a choice will be created.
      },
      &quot;deleteField&quot;: { # Request to delete the field. # Deletes a field from the label.
        &quot;id&quot;: &quot;A String&quot;, # Required. ID of the field to delete.
      },
      &quot;deleteSelectionChoice&quot;: { # Request to delete a choice. # Delete a choice within a selection field.
        &quot;fieldId&quot;: &quot;A String&quot;, # Required. The selection field from which a choice will be deleted.
        &quot;id&quot;: &quot;A String&quot;, # Required. Choice to delete.
      },
      &quot;disableField&quot;: { # Request to disable the field. # Disables the field.
        &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # Required. Field disabled policy.
          &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
          &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
        },
        &quot;id&quot;: &quot;A String&quot;, # Required. Key of the field to disable.
        &quot;updateMask&quot;: &quot;A String&quot;, # The fields that should be updated. At least one field must be specified. The root `disabled_policy` is implied and should not be specified. A single `*` can be used as a short-hand for updating every field.
      },
      &quot;disableSelectionChoice&quot;: { # Request to disable a choice. # Disable a choice within a selection field.
        &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # Required. The disabled policy to update.
          &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
          &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
        },
        &quot;fieldId&quot;: &quot;A String&quot;, # Required. The selection field in which a choice will be disabled.
        &quot;id&quot;: &quot;A String&quot;, # Required. Choice to disable.
        &quot;updateMask&quot;: &quot;A String&quot;, # The fields that should be updated. At least one field must be specified. The root `disabled_policy` is implied and should not be specified. A single `*` can be used as a short-hand for updating every field.
      },
      &quot;enableField&quot;: { # Request to enable the field. # Enables the field.
        &quot;id&quot;: &quot;A String&quot;, # Required. ID of the field to enable.
      },
      &quot;enableSelectionChoice&quot;: { # Request to enable a choice. # Enable a choice within a selection field.
        &quot;fieldId&quot;: &quot;A String&quot;, # Required. The selection field in which a choice will be enabled.
        &quot;id&quot;: &quot;A String&quot;, # Required. Choice to enable.
      },
      &quot;updateField&quot;: { # Request to update field properties. # Updates basic properties of a field.
        &quot;id&quot;: &quot;A String&quot;, # Required. The field to update.
        &quot;properties&quot;: { # The basic properties of the field. # Required. Basic field properties.
          &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
          &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
          &quot;required&quot;: True or False, # Whether the field should be marked as required.
        },
        &quot;updateMask&quot;: &quot;A String&quot;, # The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `*` can be used as a short-hand for updating every field.
      },
      &quot;updateFieldType&quot;: { # Request to change the type of a field. # Update field type and/or type options.
        &quot;dateOptions&quot;: { # Options for the date field type. # Update field to Date.
          &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
          &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
          &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
            &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
            &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          },
          &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
            &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
            &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          },
        },
        &quot;id&quot;: &quot;A String&quot;, # Required. The field to update.
        &quot;integerOptions&quot;: { # Options for the Integer field type. # Update field to Integer.
          &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
          &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
        },
        &quot;selectionOptions&quot;: { # Options for the selection field type. # Update field to Selection.
          &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
            { # Selection field choice.
              &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
                &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
                &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
                &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
              },
              &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
              &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
                &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
              },
              &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
              &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
                &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
              },
              &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
                &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                  &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                },
                &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
                &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                  &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                },
                &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
                &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
                &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
              },
              &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
              &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
                &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                  &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                  &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
                },
                &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
                &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
              },
              &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
                &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
              },
              &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
                &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                  &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
                },
                &quot;description&quot;: &quot;A String&quot;, # The description of this label.
                &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
                &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
              },
              &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
              &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
                &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
              },
              &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
                &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
                &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
                &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
                &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
              },
              &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
              &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
                &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
              },
            },
          ],
          &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
            &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
          },
        },
        &quot;textOptions&quot;: { # Options for the Text field type. # Update field to Text.
          &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
          &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
        },
        &quot;updateMask&quot;: &quot;A String&quot;, # The fields that should be updated. At least one field must be specified. The root of `type_options` is implied and should not be specified. A single `*` can be used as a short-hand for updating every field.
        &quot;userOptions&quot;: { # Options for the user field type. # Update field to User.
          &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
            &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
          },
        },
      },
      &quot;updateLabel&quot;: { # Updates basic properties of a label. # Updates the label properties.
        &quot;properties&quot;: { # Basic properties of the label. # Required. Label properties to update.
          &quot;description&quot;: &quot;A String&quot;, # The description of the label.
          &quot;title&quot;: &quot;A String&quot;, # Required. Title of the label.
        },
        &quot;updateMask&quot;: &quot;A String&quot;, # The fields that should be updated. At least one field must be specified. The root `label_properties` is implied and should not be specified. A single `*` can be used as a short-hand for updating every field.
      },
      &quot;updateSelectionChoiceProperties&quot;: { # Request to update a choice property. # Update a choice property within a selection field.
        &quot;fieldId&quot;: &quot;A String&quot;, # Required. The selection field to update.
        &quot;id&quot;: &quot;A String&quot;, # Required. The choice to update.
        &quot;properties&quot;: { # Basic properties of the choice. # Required. The choice properties to update.
          &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
            &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
              &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
              &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
              &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
              &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
            },
            &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
          },
          &quot;description&quot;: &quot;A String&quot;, # The description of this label.
          &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
          &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
        },
        &quot;updateMask&quot;: &quot;A String&quot;, # The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `*` can be used as a short-hand for updating every field.
      },
    },
  ],
  &quot;useAdminAccess&quot;: True or False, # Set to `true` in order to use the user&#x27;s admin credentials. The server will verify the user is an admin for the label before allowing access.
  &quot;view&quot;: &quot;A String&quot;, # When specified, only certain fields belonging to the indicated view will be returned.
  &quot;writeControl&quot;: { # Provides control over how write requests are executed. When not specified, the last write wins. # Provides control over how write requests are executed.
    &quot;requiredRevisionId&quot;: &quot;A String&quot;, # The revision ID of the label that the write request will be applied to. If this isn&#x27;t the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for label update.
  &quot;responses&quot;: [ # The reply of the updates. This maps 1:1 with the updates, although responses to some requests may be empty.
    { # A single response from an update.
      &quot;createField&quot;: { # Response following field create. # Creates a field.
        &quot;id&quot;: &quot;A String&quot;, # The field of the created field. When left blank in a create request, a key will be autogenerated and can be identified here.
        &quot;priority&quot;: 42, # The priority of the created field. The priority may change from what was specified to assure contiguous priorities between fields (1-n).
      },
      &quot;createSelectionChoice&quot;: { # Response following selection choice create. # Creates a selection list option to add to a selection field.
        &quot;fieldId&quot;: &quot;A String&quot;, # The server-generated ID of the field.
        &quot;id&quot;: &quot;A String&quot;, # The server-generated ID of the created choice within the field.
      },
      &quot;deleteField&quot;: { # Response following field delete. # Deletes a field from the label.
      },
      &quot;deleteSelectionChoice&quot;: { # Response following choice delete. # Deletes a choice from a selection field.
      },
      &quot;disableField&quot;: { # Response following field disable. # Disables field.
      },
      &quot;disableSelectionChoice&quot;: { # Response following choice disable. # Disables a choice within a selection field.
      },
      &quot;enableField&quot;: { # Response following field enable. # Enables field.
      },
      &quot;enableSelectionChoice&quot;: { # Response following choice enable. # Enables a choice within a selection field.
      },
      &quot;updateField&quot;: { # Response following update to field properties. # Updates basic properties of a field.
        &quot;priority&quot;: 42, # The priority of the updated field. The priority may change from what was specified to assure contiguous priorities between fields (1-n).
      },
      &quot;updateFieldType&quot;: { # Response following update to field type. # Updates field type and/or type options.
      },
      &quot;updateLabel&quot;: { # Response following update to label properties. # Updates basic properties of a label.
      },
      &quot;updateSelectionChoiceProperties&quot;: { # Response following update to selection choice properties. # Updates a choice within a selection field.
        &quot;priority&quot;: 42, # The priority of the updated choice. The priority may change from what was specified to assure contiguous priorities between choices (1-n).
      },
    },
  ],
  &quot;updatedLabel&quot;: { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items. # The label after updates were applied. This is only set if `include_label_in_response` is `true` and there were no errors.
    &quot;appliedCapabilities&quot;: { # The capabilities a user has on this label&#x27;s applied metadata. # Output only. The capabilities related to this label on applied metadata.
      &quot;canApply&quot;: True or False, # Whether the user can apply this label to items.
      &quot;canRead&quot;: True or False, # Whether the user can read applied metadata related to this label.
      &quot;canRemove&quot;: True or False, # Whether the user can remove this label from items.
    },
    &quot;appliedLabelPolicy&quot;: { # Behavior of this label when it&#x27;s applied to Drive items. # Output only. Behavior of this label when it&#x27;s applied to Drive items.
      &quot;copyMode&quot;: &quot;A String&quot;, # Indicates how the applied label and field values should be copied when a Drive item is copied.
    },
    &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this label was created.
    &quot;creator&quot;: { # Information about a user. # Output only. The user who created this label.
      &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
    },
    &quot;customer&quot;: &quot;A String&quot;, # Output only. The customer this label belongs to. For example: `customers/123abc789`.
    &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this label was disabled. This value has no meaning when the label isn&#x27;t disabled.
    &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label isn&#x27;t disabled.
      &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
    },
    &quot;displayHints&quot;: { # The UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
      &quot;disabled&quot;: True or False, # Whether the label should be shown in the UI as disabled.
      &quot;hiddenInSearch&quot;: True or False, # This label should be hidden in the search menu when searching for Drive items.
      &quot;priority&quot;: &quot;A String&quot;, # The order to display labels in a list.
      &quot;shownInApply&quot;: True or False, # This label should be shown in the apply menu when applying values to a Drive item.
    },
    &quot;enabledAppSettings&quot;: { # Describes the Google Workspace apps in which the label can be used. # Optional. The `EnabledAppSettings` for this Label.
      &quot;enabledApps&quot;: [ # Optional. The list of apps where the label can be used.
        { # An app where the label can be used.
          &quot;app&quot;: &quot;A String&quot;, # Optional. The name of the app.
        },
      ],
    },
    &quot;fields&quot;: [ # List of fields in descending priority order.
      { # Defines a field that has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item.
        &quot;appliedCapabilities&quot;: { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
          &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
          &quot;canSearch&quot;: True or False, # Whether the user can search for Drive items referencing this field.
          &quot;canWrite&quot;: True or False, # Whether the user can set this field on Drive items.
        },
        &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this field was created.
        &quot;creator&quot;: { # Information about a user. # Output only. The user who created this field.
          &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        },
        &quot;dateOptions&quot;: { # Options for the date field type. # Date field options.
          &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
          &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
          &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
            &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
            &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          },
          &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
            &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
            &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          },
        },
        &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
        &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
          &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        },
        &quot;displayHints&quot;: { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
          &quot;disabled&quot;: True or False, # Whether the field should be shown in the UI as disabled.
          &quot;hiddenInSearch&quot;: True or False, # This field should be hidden in the search menu when searching for Drive items.
          &quot;required&quot;: True or False, # Whether the field should be shown as required in the UI.
          &quot;shownInApply&quot;: True or False, # This field should be shown in the apply menu when applying values to a Drive item.
        },
        &quot;id&quot;: &quot;A String&quot;, # Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
        &quot;integerOptions&quot;: { # Options for the Integer field type. # Integer field options.
          &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
          &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
        },
        &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle of this field.
          &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
            &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
            &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
          },
          &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
          &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
        },
        &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this field.
          &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
        },
        &quot;properties&quot;: { # The basic properties of the field. # The basic properties of the field.
          &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
          &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
          &quot;required&quot;: True or False, # Whether the field should be marked as required.
        },
        &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
          &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        },
        &quot;queryKey&quot;: &quot;A String&quot;, # Output only. The key to use when constructing Drive search queries to find files based on values defined for this field on files. For example, &quot;`{query_key}` &gt; 2001-01-01&quot;.
        &quot;schemaCapabilities&quot;: { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
          &quot;canDelete&quot;: True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
          &quot;canDisable&quot;: True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
          &quot;canEnable&quot;: True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
          &quot;canUpdate&quot;: True or False, # Whether the user can change this field.
        },
        &quot;selectionOptions&quot;: { # Options for the selection field type. # Selection field options.
          &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
            { # Selection field choice.
              &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
                &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
                &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
                &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
              },
              &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
              &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
                &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
              },
              &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
              &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
                &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
              },
              &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
                &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                  &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                },
                &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
                &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                  &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                },
                &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
                &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
                &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
              },
              &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
              &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
                &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                  &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                  &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
                },
                &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
                &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
              },
              &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
                &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
              },
              &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
                &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                  &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                    &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                    &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                    &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                    &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                  },
                  &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
                },
                &quot;description&quot;: &quot;A String&quot;, # The description of this label.
                &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
                &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
              },
              &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
              &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
                &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
              },
              &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
                &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
                &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
                &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
                &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
              },
              &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
              &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
                &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
              },
            },
          ],
          &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
            &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
          },
        },
        &quot;textOptions&quot;: { # Options for the Text field type. # Text field options.
          &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
          &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
        },
        &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this field was updated.
        &quot;updater&quot;: { # Information about a user. # Output only. The user who modified this field.
          &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
        },
        &quot;userOptions&quot;: { # Options for the user field type. # User field options.
          &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
            &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
          },
        },
      },
    ],
    &quot;id&quot;: &quot;A String&quot;, # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`.
    &quot;labelType&quot;: &quot;A String&quot;, # Required. The type of label.
    &quot;learnMoreUri&quot;: &quot;A String&quot;, # Custom URL to present to users to allow them to learn more about this label and how it should be used.
    &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle state of the label including whether it&#x27;s published, deprecated, and has draft changes.
      &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
        &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
        &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
      },
      &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
      &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
    },
    &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this label.
      &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
    },
    &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
    &quot;properties&quot;: { # Basic properties of the label. # Required. The basic properties of the label.
      &quot;description&quot;: &quot;A String&quot;, # The description of the label.
      &quot;title&quot;: &quot;A String&quot;, # Required. Title of the label.
    },
    &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this label was published. This value has no meaning when the label isn&#x27;t published.
    &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label isn&#x27;t published.&gt;&gt;
      &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
    },
    &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The time this label revision was created.
    &quot;revisionCreator&quot;: { # Information about a user. # Output only. The user who created this label revision.
      &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
    },
    &quot;revisionId&quot;: &quot;A String&quot;, # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`.
    &quot;schemaCapabilities&quot;: { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
      &quot;canDelete&quot;: True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
      &quot;canDisable&quot;: True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
      &quot;canEnable&quot;: True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
      &quot;canUpdate&quot;: True or False, # Whether the user can change this label.
    },
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="disable">disable(name, body=None, x__xgafv=None)</code>
  <pre>Disable a published label. For more information, see [Disable, enable, and delete a label](https://developers.google.com/workspace/drive/labels/guides/disable-delete-label). Disabling a label will result in a new disabled published revision based on the current published revision. If there&#x27;s a draft revision, a new disabled draft revision will be created based on the latest draft revision. Older draft revisions will be deleted. Once disabled, a label may be deleted with `DeleteLabel`.

Args:
  name: string, Required. Label resource name. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to deprecate a published label.
  &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # Disabled policy to use.
    &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
    &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
  },
  &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.
  &quot;updateMask&quot;: &quot;A String&quot;, # The fields that should be updated. At least one field must be specified. The root `disabled_policy` is implied and should not be specified. A single `*` can be used as a short-hand for updating every field.
  &quot;useAdminAccess&quot;: True or False, # Set to `true` in order to use the user&#x27;s admin credentials. The server will verify the user is an admin for the label before allowing access.
  &quot;writeControl&quot;: { # Provides control over how write requests are executed. When not specified, the last write wins. # Provides control over how write requests are executed. Defaults to unset, which means the last write wins.
    &quot;requiredRevisionId&quot;: &quot;A String&quot;, # The revision ID of the label that the write request will be applied to. If this isn&#x27;t the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  &quot;appliedCapabilities&quot;: { # The capabilities a user has on this label&#x27;s applied metadata. # Output only. The capabilities related to this label on applied metadata.
    &quot;canApply&quot;: True or False, # Whether the user can apply this label to items.
    &quot;canRead&quot;: True or False, # Whether the user can read applied metadata related to this label.
    &quot;canRemove&quot;: True or False, # Whether the user can remove this label from items.
  },
  &quot;appliedLabelPolicy&quot;: { # Behavior of this label when it&#x27;s applied to Drive items. # Output only. Behavior of this label when it&#x27;s applied to Drive items.
    &quot;copyMode&quot;: &quot;A String&quot;, # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this label was created.
  &quot;creator&quot;: { # Information about a user. # Output only. The user who created this label.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;customer&quot;: &quot;A String&quot;, # Output only. The customer this label belongs to. For example: `customers/123abc789`.
  &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this label was disabled. This value has no meaning when the label isn&#x27;t disabled.
  &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label isn&#x27;t disabled.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;displayHints&quot;: { # The UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    &quot;disabled&quot;: True or False, # Whether the label should be shown in the UI as disabled.
    &quot;hiddenInSearch&quot;: True or False, # This label should be hidden in the search menu when searching for Drive items.
    &quot;priority&quot;: &quot;A String&quot;, # The order to display labels in a list.
    &quot;shownInApply&quot;: True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  &quot;enabledAppSettings&quot;: { # Describes the Google Workspace apps in which the label can be used. # Optional. The `EnabledAppSettings` for this Label.
    &quot;enabledApps&quot;: [ # Optional. The list of apps where the label can be used.
      { # An app where the label can be used.
        &quot;app&quot;: &quot;A String&quot;, # Optional. The name of the app.
      },
    ],
  },
  &quot;fields&quot;: [ # List of fields in descending priority order.
    { # Defines a field that has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item.
      &quot;appliedCapabilities&quot;: { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
        &quot;canSearch&quot;: True or False, # Whether the user can search for Drive items referencing this field.
        &quot;canWrite&quot;: True or False, # Whether the user can set this field on Drive items.
      },
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this field was created.
      &quot;creator&quot;: { # Information about a user. # Output only. The user who created this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;dateOptions&quot;: { # Options for the date field type. # Date field options.
        &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
        &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
        &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;displayHints&quot;: { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        &quot;disabled&quot;: True or False, # Whether the field should be shown in the UI as disabled.
        &quot;hiddenInSearch&quot;: True or False, # This field should be hidden in the search menu when searching for Drive items.
        &quot;required&quot;: True or False, # Whether the field should be shown as required in the UI.
        &quot;shownInApply&quot;: True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      &quot;id&quot;: &quot;A String&quot;, # Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
      &quot;integerOptions&quot;: { # Options for the Integer field type. # Integer field options.
        &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
        &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
      },
      &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle of this field.
        &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
          &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
        },
        &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
      },
      &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this field.
        &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
      },
      &quot;properties&quot;: { # The basic properties of the field. # The basic properties of the field.
        &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
        &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
        &quot;required&quot;: True or False, # Whether the field should be marked as required.
      },
      &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;queryKey&quot;: &quot;A String&quot;, # Output only. The key to use when constructing Drive search queries to find files based on values defined for this field on files. For example, &quot;`{query_key}` &gt; 2001-01-01&quot;.
      &quot;schemaCapabilities&quot;: { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        &quot;canDelete&quot;: True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        &quot;canDisable&quot;: True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        &quot;canEnable&quot;: True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        &quot;canUpdate&quot;: True or False, # Whether the user can change this field.
      },
      &quot;selectionOptions&quot;: { # Options for the selection field type. # Selection field options.
        &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
              &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
              &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
            },
            &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
            &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
              &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
              &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
              &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
              &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
              },
              &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
            },
            &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
              &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
            },
            &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
              &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              &quot;description&quot;: &quot;A String&quot;, # The description of this label.
              &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
              &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
              &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
              &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
              &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
            },
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
            &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
          },
        ],
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
      &quot;textOptions&quot;: { # Options for the Text field type. # Text field options.
        &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
        &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
      },
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this field was updated.
      &quot;updater&quot;: { # Information about a user. # Output only. The user who modified this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;userOptions&quot;: { # Options for the user field type. # User field options.
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  &quot;id&quot;: &quot;A String&quot;, # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;labelType&quot;: &quot;A String&quot;, # Required. The type of label.
  &quot;learnMoreUri&quot;: &quot;A String&quot;, # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle state of the label including whether it&#x27;s published, deprecated, and has draft changes.
    &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
      &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
    },
    &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
  },
  &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this label.
    &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  &quot;properties&quot;: { # Basic properties of the label. # Required. The basic properties of the label.
    &quot;description&quot;: &quot;A String&quot;, # The description of the label.
    &quot;title&quot;: &quot;A String&quot;, # Required. Title of the label.
  },
  &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this label was published. This value has no meaning when the label isn&#x27;t published.
  &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label isn&#x27;t published.&gt;&gt;
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The time this label revision was created.
  &quot;revisionCreator&quot;: { # Information about a user. # Output only. The user who created this label revision.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionId&quot;: &quot;A String&quot;, # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;schemaCapabilities&quot;: { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    &quot;canDelete&quot;: True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    &quot;canDisable&quot;: True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    &quot;canEnable&quot;: True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    &quot;canUpdate&quot;: True or False, # Whether the user can change this label.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="enable">enable(name, body=None, x__xgafv=None)</code>
  <pre>Enable a disabled label and restore it to its published state. For more information, see [Disable, enable, and delete a label](https://developers.google.com/workspace/drive/labels/guides/disable-delete-label). This will result in a new published revision based on the current disabled published revision. If there&#x27;s an existing disabled draft revision, a new revision will be created based on that draft and will be enabled.

Args:
  name: string, Required. Label resource name. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to enable a label.
  &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.
  &quot;useAdminAccess&quot;: True or False, # Set to `true` in order to use the user&#x27;s admin credentials. The server will verify the user is an admin for the label before allowing access.
  &quot;writeControl&quot;: { # Provides control over how write requests are executed. When not specified, the last write wins. # Provides control over how write requests are executed. Defaults to unset, which means the last write wins.
    &quot;requiredRevisionId&quot;: &quot;A String&quot;, # The revision ID of the label that the write request will be applied to. If this isn&#x27;t the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  &quot;appliedCapabilities&quot;: { # The capabilities a user has on this label&#x27;s applied metadata. # Output only. The capabilities related to this label on applied metadata.
    &quot;canApply&quot;: True or False, # Whether the user can apply this label to items.
    &quot;canRead&quot;: True or False, # Whether the user can read applied metadata related to this label.
    &quot;canRemove&quot;: True or False, # Whether the user can remove this label from items.
  },
  &quot;appliedLabelPolicy&quot;: { # Behavior of this label when it&#x27;s applied to Drive items. # Output only. Behavior of this label when it&#x27;s applied to Drive items.
    &quot;copyMode&quot;: &quot;A String&quot;, # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this label was created.
  &quot;creator&quot;: { # Information about a user. # Output only. The user who created this label.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;customer&quot;: &quot;A String&quot;, # Output only. The customer this label belongs to. For example: `customers/123abc789`.
  &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this label was disabled. This value has no meaning when the label isn&#x27;t disabled.
  &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label isn&#x27;t disabled.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;displayHints&quot;: { # The UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    &quot;disabled&quot;: True or False, # Whether the label should be shown in the UI as disabled.
    &quot;hiddenInSearch&quot;: True or False, # This label should be hidden in the search menu when searching for Drive items.
    &quot;priority&quot;: &quot;A String&quot;, # The order to display labels in a list.
    &quot;shownInApply&quot;: True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  &quot;enabledAppSettings&quot;: { # Describes the Google Workspace apps in which the label can be used. # Optional. The `EnabledAppSettings` for this Label.
    &quot;enabledApps&quot;: [ # Optional. The list of apps where the label can be used.
      { # An app where the label can be used.
        &quot;app&quot;: &quot;A String&quot;, # Optional. The name of the app.
      },
    ],
  },
  &quot;fields&quot;: [ # List of fields in descending priority order.
    { # Defines a field that has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item.
      &quot;appliedCapabilities&quot;: { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
        &quot;canSearch&quot;: True or False, # Whether the user can search for Drive items referencing this field.
        &quot;canWrite&quot;: True or False, # Whether the user can set this field on Drive items.
      },
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this field was created.
      &quot;creator&quot;: { # Information about a user. # Output only. The user who created this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;dateOptions&quot;: { # Options for the date field type. # Date field options.
        &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
        &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
        &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;displayHints&quot;: { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        &quot;disabled&quot;: True or False, # Whether the field should be shown in the UI as disabled.
        &quot;hiddenInSearch&quot;: True or False, # This field should be hidden in the search menu when searching for Drive items.
        &quot;required&quot;: True or False, # Whether the field should be shown as required in the UI.
        &quot;shownInApply&quot;: True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      &quot;id&quot;: &quot;A String&quot;, # Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
      &quot;integerOptions&quot;: { # Options for the Integer field type. # Integer field options.
        &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
        &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
      },
      &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle of this field.
        &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
          &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
        },
        &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
      },
      &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this field.
        &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
      },
      &quot;properties&quot;: { # The basic properties of the field. # The basic properties of the field.
        &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
        &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
        &quot;required&quot;: True or False, # Whether the field should be marked as required.
      },
      &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;queryKey&quot;: &quot;A String&quot;, # Output only. The key to use when constructing Drive search queries to find files based on values defined for this field on files. For example, &quot;`{query_key}` &gt; 2001-01-01&quot;.
      &quot;schemaCapabilities&quot;: { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        &quot;canDelete&quot;: True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        &quot;canDisable&quot;: True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        &quot;canEnable&quot;: True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        &quot;canUpdate&quot;: True or False, # Whether the user can change this field.
      },
      &quot;selectionOptions&quot;: { # Options for the selection field type. # Selection field options.
        &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
              &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
              &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
            },
            &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
            &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
              &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
              &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
              &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
              &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
              },
              &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
            },
            &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
              &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
            },
            &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
              &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              &quot;description&quot;: &quot;A String&quot;, # The description of this label.
              &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
              &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
              &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
              &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
              &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
            },
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
            &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
          },
        ],
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
      &quot;textOptions&quot;: { # Options for the Text field type. # Text field options.
        &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
        &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
      },
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this field was updated.
      &quot;updater&quot;: { # Information about a user. # Output only. The user who modified this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;userOptions&quot;: { # Options for the user field type. # User field options.
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  &quot;id&quot;: &quot;A String&quot;, # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;labelType&quot;: &quot;A String&quot;, # Required. The type of label.
  &quot;learnMoreUri&quot;: &quot;A String&quot;, # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle state of the label including whether it&#x27;s published, deprecated, and has draft changes.
    &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
      &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
    },
    &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
  },
  &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this label.
    &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  &quot;properties&quot;: { # Basic properties of the label. # Required. The basic properties of the label.
    &quot;description&quot;: &quot;A String&quot;, # The description of the label.
    &quot;title&quot;: &quot;A String&quot;, # Required. Title of the label.
  },
  &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this label was published. This value has no meaning when the label isn&#x27;t published.
  &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label isn&#x27;t published.&gt;&gt;
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The time this label revision was created.
  &quot;revisionCreator&quot;: { # Information about a user. # Output only. The user who created this label revision.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionId&quot;: &quot;A String&quot;, # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;schemaCapabilities&quot;: { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    &quot;canDelete&quot;: True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    &quot;canDisable&quot;: True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    &quot;canEnable&quot;: True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    &quot;canUpdate&quot;: True or False, # Whether the user can change this label.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, languageCode=None, useAdminAccess=None, view=None, x__xgafv=None)</code>
  <pre>Get a label by its resource name. For more information, see [Search for labels](https://developers.google.com/workspace/drive/labels/guides/search-label). Resource name may be any of: * `labels/{id}` - See `labels/{id}@latest` * `labels/{id}@latest` - Gets the latest revision of the label. * `labels/{id}@published` - Gets the current published revision of the label. * `labels/{id}@{revision_id}` - Gets the label at the specified revision ID.

Args:
  name: string, Required. Label resource name. May be any of: * `labels/{id}` (equivalent to labels/{id}@latest) * `labels/{id}@latest` * `labels/{id}@published` * `labels/{id}@{revision_id}` (required)
  languageCode: string, The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language are used.
  useAdminAccess: boolean, Set to `true` in order to use the user&#x27;s admin credentials. The server verifies that the user is an admin for the label before allowing access.
  view: string, When specified, only certain fields belonging to the indicated view are returned.
    Allowed values
      LABEL_VIEW_BASIC - Implies the field mask: `name,id,revision_id,label_type,properties.*`
      LABEL_VIEW_FULL - All possible fields.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  &quot;appliedCapabilities&quot;: { # The capabilities a user has on this label&#x27;s applied metadata. # Output only. The capabilities related to this label on applied metadata.
    &quot;canApply&quot;: True or False, # Whether the user can apply this label to items.
    &quot;canRead&quot;: True or False, # Whether the user can read applied metadata related to this label.
    &quot;canRemove&quot;: True or False, # Whether the user can remove this label from items.
  },
  &quot;appliedLabelPolicy&quot;: { # Behavior of this label when it&#x27;s applied to Drive items. # Output only. Behavior of this label when it&#x27;s applied to Drive items.
    &quot;copyMode&quot;: &quot;A String&quot;, # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this label was created.
  &quot;creator&quot;: { # Information about a user. # Output only. The user who created this label.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;customer&quot;: &quot;A String&quot;, # Output only. The customer this label belongs to. For example: `customers/123abc789`.
  &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this label was disabled. This value has no meaning when the label isn&#x27;t disabled.
  &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label isn&#x27;t disabled.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;displayHints&quot;: { # The UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    &quot;disabled&quot;: True or False, # Whether the label should be shown in the UI as disabled.
    &quot;hiddenInSearch&quot;: True or False, # This label should be hidden in the search menu when searching for Drive items.
    &quot;priority&quot;: &quot;A String&quot;, # The order to display labels in a list.
    &quot;shownInApply&quot;: True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  &quot;enabledAppSettings&quot;: { # Describes the Google Workspace apps in which the label can be used. # Optional. The `EnabledAppSettings` for this Label.
    &quot;enabledApps&quot;: [ # Optional. The list of apps where the label can be used.
      { # An app where the label can be used.
        &quot;app&quot;: &quot;A String&quot;, # Optional. The name of the app.
      },
    ],
  },
  &quot;fields&quot;: [ # List of fields in descending priority order.
    { # Defines a field that has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item.
      &quot;appliedCapabilities&quot;: { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
        &quot;canSearch&quot;: True or False, # Whether the user can search for Drive items referencing this field.
        &quot;canWrite&quot;: True or False, # Whether the user can set this field on Drive items.
      },
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this field was created.
      &quot;creator&quot;: { # Information about a user. # Output only. The user who created this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;dateOptions&quot;: { # Options for the date field type. # Date field options.
        &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
        &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
        &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;displayHints&quot;: { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        &quot;disabled&quot;: True or False, # Whether the field should be shown in the UI as disabled.
        &quot;hiddenInSearch&quot;: True or False, # This field should be hidden in the search menu when searching for Drive items.
        &quot;required&quot;: True or False, # Whether the field should be shown as required in the UI.
        &quot;shownInApply&quot;: True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      &quot;id&quot;: &quot;A String&quot;, # Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
      &quot;integerOptions&quot;: { # Options for the Integer field type. # Integer field options.
        &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
        &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
      },
      &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle of this field.
        &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
          &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
        },
        &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
      },
      &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this field.
        &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
      },
      &quot;properties&quot;: { # The basic properties of the field. # The basic properties of the field.
        &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
        &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
        &quot;required&quot;: True or False, # Whether the field should be marked as required.
      },
      &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;queryKey&quot;: &quot;A String&quot;, # Output only. The key to use when constructing Drive search queries to find files based on values defined for this field on files. For example, &quot;`{query_key}` &gt; 2001-01-01&quot;.
      &quot;schemaCapabilities&quot;: { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        &quot;canDelete&quot;: True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        &quot;canDisable&quot;: True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        &quot;canEnable&quot;: True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        &quot;canUpdate&quot;: True or False, # Whether the user can change this field.
      },
      &quot;selectionOptions&quot;: { # Options for the selection field type. # Selection field options.
        &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
              &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
              &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
            },
            &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
            &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
              &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
              &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
              &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
              &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
              },
              &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
            },
            &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
              &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
            },
            &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
              &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              &quot;description&quot;: &quot;A String&quot;, # The description of this label.
              &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
              &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
              &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
              &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
              &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
            },
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
            &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
          },
        ],
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
      &quot;textOptions&quot;: { # Options for the Text field type. # Text field options.
        &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
        &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
      },
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this field was updated.
      &quot;updater&quot;: { # Information about a user. # Output only. The user who modified this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;userOptions&quot;: { # Options for the user field type. # User field options.
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  &quot;id&quot;: &quot;A String&quot;, # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;labelType&quot;: &quot;A String&quot;, # Required. The type of label.
  &quot;learnMoreUri&quot;: &quot;A String&quot;, # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle state of the label including whether it&#x27;s published, deprecated, and has draft changes.
    &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
      &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
    },
    &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
  },
  &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this label.
    &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  &quot;properties&quot;: { # Basic properties of the label. # Required. The basic properties of the label.
    &quot;description&quot;: &quot;A String&quot;, # The description of the label.
    &quot;title&quot;: &quot;A String&quot;, # Required. Title of the label.
  },
  &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this label was published. This value has no meaning when the label isn&#x27;t published.
  &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label isn&#x27;t published.&gt;&gt;
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The time this label revision was created.
  &quot;revisionCreator&quot;: { # Information about a user. # Output only. The user who created this label revision.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionId&quot;: &quot;A String&quot;, # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;schemaCapabilities&quot;: { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    &quot;canDelete&quot;: True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    &quot;canDisable&quot;: True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    &quot;canEnable&quot;: True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    &quot;canUpdate&quot;: True or False, # Whether the user can change this label.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(customer=None, languageCode=None, minimumRole=None, pageSize=None, pageToken=None, publishedOnly=None, useAdminAccess=None, view=None, x__xgafv=None)</code>
  <pre>List labels. For more information, see [Search for labels](https://developers.google.com/workspace/drive/labels/guides/search-label).

Args:
  customer: string, The customer to scope this list request to. For example: `customers/abcd1234`. If unset, will return all labels within the current customer.
  languageCode: string, The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language are used.
  minimumRole: string, Specifies the level of access the user must have on the returned labels. The minimum role a user must have on a label. Defaults to `READER`.
    Allowed values
      LABEL_ROLE_UNSPECIFIED - Unknown role.
      READER - A reader can read the label and associated metadata applied to Drive items.
      APPLIER - An applier can write associated metadata on Drive items in which they also have write access to. Implies `READER`.
      ORGANIZER - An organizer can pin this label in shared drives they manage and add new appliers to the label.
      EDITOR - Editors can make any update including deleting the label which also deletes the associated Drive item metadata. Implies `APPLIER`.
  pageSize: integer, Maximum number of labels to return per page. Default: 50. Max: 200.
  pageToken: string, The token of the page to return.
  publishedOnly: boolean, Whether to include only published labels in the results. * When `true`, only the current published label revisions are returned. Disabled labels are included. Returned label resource names reference the published revision (`labels/{id}/{revision_id}`). * When `false`, the current label revisions are returned, which might not be published. Returned label resource names don&#x27;t reference a specific revision (`labels/{id}`).
  useAdminAccess: boolean, Set to `true` in order to use the user&#x27;s admin credentials. This will return all labels within the customer.
  view: string, When specified, only certain fields belonging to the indicated view are returned.
    Allowed values
      LABEL_VIEW_BASIC - Implies the field mask: `name,id,revision_id,label_type,properties.*`
      LABEL_VIEW_FULL - All possible fields.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for listing labels.
  &quot;labels&quot;: [ # Labels.
    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
      &quot;appliedCapabilities&quot;: { # The capabilities a user has on this label&#x27;s applied metadata. # Output only. The capabilities related to this label on applied metadata.
        &quot;canApply&quot;: True or False, # Whether the user can apply this label to items.
        &quot;canRead&quot;: True or False, # Whether the user can read applied metadata related to this label.
        &quot;canRemove&quot;: True or False, # Whether the user can remove this label from items.
      },
      &quot;appliedLabelPolicy&quot;: { # Behavior of this label when it&#x27;s applied to Drive items. # Output only. Behavior of this label when it&#x27;s applied to Drive items.
        &quot;copyMode&quot;: &quot;A String&quot;, # Indicates how the applied label and field values should be copied when a Drive item is copied.
      },
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this label was created.
      &quot;creator&quot;: { # Information about a user. # Output only. The user who created this label.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;customer&quot;: &quot;A String&quot;, # Output only. The customer this label belongs to. For example: `customers/123abc789`.
      &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this label was disabled. This value has no meaning when the label isn&#x27;t disabled.
      &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label isn&#x27;t disabled.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;displayHints&quot;: { # The UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
        &quot;disabled&quot;: True or False, # Whether the label should be shown in the UI as disabled.
        &quot;hiddenInSearch&quot;: True or False, # This label should be hidden in the search menu when searching for Drive items.
        &quot;priority&quot;: &quot;A String&quot;, # The order to display labels in a list.
        &quot;shownInApply&quot;: True or False, # This label should be shown in the apply menu when applying values to a Drive item.
      },
      &quot;enabledAppSettings&quot;: { # Describes the Google Workspace apps in which the label can be used. # Optional. The `EnabledAppSettings` for this Label.
        &quot;enabledApps&quot;: [ # Optional. The list of apps where the label can be used.
          { # An app where the label can be used.
            &quot;app&quot;: &quot;A String&quot;, # Optional. The name of the app.
          },
        ],
      },
      &quot;fields&quot;: [ # List of fields in descending priority order.
        { # Defines a field that has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item.
          &quot;appliedCapabilities&quot;: { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
            &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
            &quot;canSearch&quot;: True or False, # Whether the user can search for Drive items referencing this field.
            &quot;canWrite&quot;: True or False, # Whether the user can set this field on Drive items.
          },
          &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this field was created.
          &quot;creator&quot;: { # Information about a user. # Output only. The user who created this field.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
          &quot;dateOptions&quot;: { # Options for the date field type. # Date field options.
            &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
            &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
            &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
              &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
              &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
            &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
              &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
              &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
          },
          &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
          &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
          &quot;displayHints&quot;: { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
            &quot;disabled&quot;: True or False, # Whether the field should be shown in the UI as disabled.
            &quot;hiddenInSearch&quot;: True or False, # This field should be hidden in the search menu when searching for Drive items.
            &quot;required&quot;: True or False, # Whether the field should be shown as required in the UI.
            &quot;shownInApply&quot;: True or False, # This field should be shown in the apply menu when applying values to a Drive item.
          },
          &quot;id&quot;: &quot;A String&quot;, # Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
          &quot;integerOptions&quot;: { # Options for the Integer field type. # Integer field options.
            &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
            &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
          },
          &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle of this field.
            &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
              &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
              &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
            },
            &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
            &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
          },
          &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this field.
            &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
          },
          &quot;properties&quot;: { # The basic properties of the field. # The basic properties of the field.
            &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
            &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
            &quot;required&quot;: True or False, # Whether the field should be marked as required.
          },
          &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
          &quot;queryKey&quot;: &quot;A String&quot;, # Output only. The key to use when constructing Drive search queries to find files based on values defined for this field on files. For example, &quot;`{query_key}` &gt; 2001-01-01&quot;.
          &quot;schemaCapabilities&quot;: { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
            &quot;canDelete&quot;: True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
            &quot;canDisable&quot;: True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
            &quot;canEnable&quot;: True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
            &quot;canUpdate&quot;: True or False, # Whether the user can change this field.
          },
          &quot;selectionOptions&quot;: { # Options for the selection field type. # Selection field options.
            &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
              { # Selection field choice.
                &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
                  &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
                  &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
                  &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
                },
                &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
                &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
                  &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
                },
                &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
                &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
                  &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
                },
                &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
                  &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                    &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                  },
                  &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
                  &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                    &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                  },
                  &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
                  &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
                  &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
                },
                &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
                &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
                  &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                    &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                    &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
                  },
                  &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
                  &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
                },
                &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
                  &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
                },
                &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
                  &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                    &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
                  },
                  &quot;description&quot;: &quot;A String&quot;, # The description of this label.
                  &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
                  &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
                },
                &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
                &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
                  &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
                },
                &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
                  &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
                  &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
                  &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
                  &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
                },
                &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
                &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
                  &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
                },
              },
            ],
            &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
              &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
            },
          },
          &quot;textOptions&quot;: { # Options for the Text field type. # Text field options.
            &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
            &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
          },
          &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this field was updated.
          &quot;updater&quot;: { # Information about a user. # Output only. The user who modified this field.
            &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
          },
          &quot;userOptions&quot;: { # Options for the user field type. # User field options.
            &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
              &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
            },
          },
        },
      ],
      &quot;id&quot;: &quot;A String&quot;, # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`.
      &quot;labelType&quot;: &quot;A String&quot;, # Required. The type of label.
      &quot;learnMoreUri&quot;: &quot;A String&quot;, # Custom URL to present to users to allow them to learn more about this label and how it should be used.
      &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle state of the label including whether it&#x27;s published, deprecated, and has draft changes.
        &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
          &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
        },
        &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
      },
      &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this label.
        &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
      },
      &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
      &quot;properties&quot;: { # Basic properties of the label. # Required. The basic properties of the label.
        &quot;description&quot;: &quot;A String&quot;, # The description of the label.
        &quot;title&quot;: &quot;A String&quot;, # Required. Title of the label.
      },
      &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this label was published. This value has no meaning when the label isn&#x27;t published.
      &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label isn&#x27;t published.&gt;&gt;
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The time this label revision was created.
      &quot;revisionCreator&quot;: { # Information about a user. # Output only. The user who created this label revision.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;revisionId&quot;: &quot;A String&quot;, # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`.
      &quot;schemaCapabilities&quot;: { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
        &quot;canDelete&quot;: True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
        &quot;canDisable&quot;: True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
        &quot;canEnable&quot;: True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
        &quot;canUpdate&quot;: True or False, # Whether the user can change this label.
      },
    },
  ],
  &quot;nextPageToken&quot;: &quot;A String&quot;, # The token of the next page in the response.
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

<div class="method">
    <code class="details" id="publish">publish(name, body=None, x__xgafv=None)</code>
  <pre>Publish all draft changes to the label. Once published, the label may not return to its draft state. For more information, see [Create and publish a label](https://developers.google.com/workspace/drive/labels/guides/create-label). Publishing a label will result in a new published revision. All previous draft revisions will be deleted. Previous published revisions will be kept but are subject to automated deletion as needed. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). Once published, some changes are no longer permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label will be rejected. For example, the following changes to a label will be rejected after the label is published: * The label cannot be directly deleted. It must be disabled first, then deleted. * `Field.FieldType` cannot be changed. * Changes to field validation options cannot reject something that was previously accepted. * Reducing the maximum entries.

Args:
  name: string, Required. Label resource name. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to publish a label.
  &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.
  &quot;useAdminAccess&quot;: True or False, # Set to `true` in order to use the user&#x27;s admin credentials. The server will verify the user is an admin for the label before allowing access.
  &quot;writeControl&quot;: { # Provides control over how write requests are executed. When not specified, the last write wins. # Provides control over how write requests are executed. Defaults to unset, which means the last write wins.
    &quot;requiredRevisionId&quot;: &quot;A String&quot;, # The revision ID of the label that the write request will be applied to. If this isn&#x27;t the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  &quot;appliedCapabilities&quot;: { # The capabilities a user has on this label&#x27;s applied metadata. # Output only. The capabilities related to this label on applied metadata.
    &quot;canApply&quot;: True or False, # Whether the user can apply this label to items.
    &quot;canRead&quot;: True or False, # Whether the user can read applied metadata related to this label.
    &quot;canRemove&quot;: True or False, # Whether the user can remove this label from items.
  },
  &quot;appliedLabelPolicy&quot;: { # Behavior of this label when it&#x27;s applied to Drive items. # Output only. Behavior of this label when it&#x27;s applied to Drive items.
    &quot;copyMode&quot;: &quot;A String&quot;, # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this label was created.
  &quot;creator&quot;: { # Information about a user. # Output only. The user who created this label.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;customer&quot;: &quot;A String&quot;, # Output only. The customer this label belongs to. For example: `customers/123abc789`.
  &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this label was disabled. This value has no meaning when the label isn&#x27;t disabled.
  &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label isn&#x27;t disabled.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;displayHints&quot;: { # The UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    &quot;disabled&quot;: True or False, # Whether the label should be shown in the UI as disabled.
    &quot;hiddenInSearch&quot;: True or False, # This label should be hidden in the search menu when searching for Drive items.
    &quot;priority&quot;: &quot;A String&quot;, # The order to display labels in a list.
    &quot;shownInApply&quot;: True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  &quot;enabledAppSettings&quot;: { # Describes the Google Workspace apps in which the label can be used. # Optional. The `EnabledAppSettings` for this Label.
    &quot;enabledApps&quot;: [ # Optional. The list of apps where the label can be used.
      { # An app where the label can be used.
        &quot;app&quot;: &quot;A String&quot;, # Optional. The name of the app.
      },
    ],
  },
  &quot;fields&quot;: [ # List of fields in descending priority order.
    { # Defines a field that has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item.
      &quot;appliedCapabilities&quot;: { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
        &quot;canSearch&quot;: True or False, # Whether the user can search for Drive items referencing this field.
        &quot;canWrite&quot;: True or False, # Whether the user can set this field on Drive items.
      },
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this field was created.
      &quot;creator&quot;: { # Information about a user. # Output only. The user who created this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;dateOptions&quot;: { # Options for the date field type. # Date field options.
        &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
        &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
        &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;displayHints&quot;: { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        &quot;disabled&quot;: True or False, # Whether the field should be shown in the UI as disabled.
        &quot;hiddenInSearch&quot;: True or False, # This field should be hidden in the search menu when searching for Drive items.
        &quot;required&quot;: True or False, # Whether the field should be shown as required in the UI.
        &quot;shownInApply&quot;: True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      &quot;id&quot;: &quot;A String&quot;, # Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
      &quot;integerOptions&quot;: { # Options for the Integer field type. # Integer field options.
        &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
        &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
      },
      &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle of this field.
        &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
          &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
        },
        &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
      },
      &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this field.
        &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
      },
      &quot;properties&quot;: { # The basic properties of the field. # The basic properties of the field.
        &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
        &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
        &quot;required&quot;: True or False, # Whether the field should be marked as required.
      },
      &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;queryKey&quot;: &quot;A String&quot;, # Output only. The key to use when constructing Drive search queries to find files based on values defined for this field on files. For example, &quot;`{query_key}` &gt; 2001-01-01&quot;.
      &quot;schemaCapabilities&quot;: { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        &quot;canDelete&quot;: True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        &quot;canDisable&quot;: True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        &quot;canEnable&quot;: True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        &quot;canUpdate&quot;: True or False, # Whether the user can change this field.
      },
      &quot;selectionOptions&quot;: { # Options for the selection field type. # Selection field options.
        &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
              &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
              &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
            },
            &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
            &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
              &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
              &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
              &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
              &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
              },
              &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
            },
            &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
              &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
            },
            &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
              &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              &quot;description&quot;: &quot;A String&quot;, # The description of this label.
              &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
              &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
              &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
              &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
              &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
            },
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
            &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
          },
        ],
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
      &quot;textOptions&quot;: { # Options for the Text field type. # Text field options.
        &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
        &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
      },
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this field was updated.
      &quot;updater&quot;: { # Information about a user. # Output only. The user who modified this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;userOptions&quot;: { # Options for the user field type. # User field options.
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  &quot;id&quot;: &quot;A String&quot;, # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;labelType&quot;: &quot;A String&quot;, # Required. The type of label.
  &quot;learnMoreUri&quot;: &quot;A String&quot;, # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle state of the label including whether it&#x27;s published, deprecated, and has draft changes.
    &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
      &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
    },
    &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
  },
  &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this label.
    &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  &quot;properties&quot;: { # Basic properties of the label. # Required. The basic properties of the label.
    &quot;description&quot;: &quot;A String&quot;, # The description of the label.
    &quot;title&quot;: &quot;A String&quot;, # Required. Title of the label.
  },
  &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this label was published. This value has no meaning when the label isn&#x27;t published.
  &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label isn&#x27;t published.&gt;&gt;
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The time this label revision was created.
  &quot;revisionCreator&quot;: { # Information about a user. # Output only. The user who created this label revision.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionId&quot;: &quot;A String&quot;, # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;schemaCapabilities&quot;: { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    &quot;canDelete&quot;: True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    &quot;canDisable&quot;: True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    &quot;canEnable&quot;: True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    &quot;canUpdate&quot;: True or False, # Whether the user can change this label.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="updateLabelCopyMode">updateLabelCopyMode(name, body=None, x__xgafv=None)</code>
  <pre>Updates a label&#x27;s `CopyMode`. Changes to this policy aren&#x27;t revisioned, don&#x27;t require publishing, and take effect immediately.

Args:
  name: string, Required. The resource name of the label to update. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to update the `CopyMode` of the given label. Changes to this policy aren&#x27;t revisioned, don&#x27;t require publishing, and take effect immediately. \
  &quot;copyMode&quot;: &quot;A String&quot;, # Required. Indicates how the applied label and field values should be copied when a Drive item is copied.
  &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.
  &quot;useAdminAccess&quot;: True or False, # Set to `true` in order to use the user&#x27;s admin credentials. The server will verify the user is an admin for the label before allowing access.
  &quot;view&quot;: &quot;A String&quot;, # When specified, only certain fields belonging to the indicated view will be returned.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  &quot;appliedCapabilities&quot;: { # The capabilities a user has on this label&#x27;s applied metadata. # Output only. The capabilities related to this label on applied metadata.
    &quot;canApply&quot;: True or False, # Whether the user can apply this label to items.
    &quot;canRead&quot;: True or False, # Whether the user can read applied metadata related to this label.
    &quot;canRemove&quot;: True or False, # Whether the user can remove this label from items.
  },
  &quot;appliedLabelPolicy&quot;: { # Behavior of this label when it&#x27;s applied to Drive items. # Output only. Behavior of this label when it&#x27;s applied to Drive items.
    &quot;copyMode&quot;: &quot;A String&quot;, # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this label was created.
  &quot;creator&quot;: { # Information about a user. # Output only. The user who created this label.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;customer&quot;: &quot;A String&quot;, # Output only. The customer this label belongs to. For example: `customers/123abc789`.
  &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this label was disabled. This value has no meaning when the label isn&#x27;t disabled.
  &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label isn&#x27;t disabled.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;displayHints&quot;: { # The UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    &quot;disabled&quot;: True or False, # Whether the label should be shown in the UI as disabled.
    &quot;hiddenInSearch&quot;: True or False, # This label should be hidden in the search menu when searching for Drive items.
    &quot;priority&quot;: &quot;A String&quot;, # The order to display labels in a list.
    &quot;shownInApply&quot;: True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  &quot;enabledAppSettings&quot;: { # Describes the Google Workspace apps in which the label can be used. # Optional. The `EnabledAppSettings` for this Label.
    &quot;enabledApps&quot;: [ # Optional. The list of apps where the label can be used.
      { # An app where the label can be used.
        &quot;app&quot;: &quot;A String&quot;, # Optional. The name of the app.
      },
    ],
  },
  &quot;fields&quot;: [ # List of fields in descending priority order.
    { # Defines a field that has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item.
      &quot;appliedCapabilities&quot;: { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
        &quot;canSearch&quot;: True or False, # Whether the user can search for Drive items referencing this field.
        &quot;canWrite&quot;: True or False, # Whether the user can set this field on Drive items.
      },
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this field was created.
      &quot;creator&quot;: { # Information about a user. # Output only. The user who created this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;dateOptions&quot;: { # Options for the date field type. # Date field options.
        &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
        &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
        &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;displayHints&quot;: { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        &quot;disabled&quot;: True or False, # Whether the field should be shown in the UI as disabled.
        &quot;hiddenInSearch&quot;: True or False, # This field should be hidden in the search menu when searching for Drive items.
        &quot;required&quot;: True or False, # Whether the field should be shown as required in the UI.
        &quot;shownInApply&quot;: True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      &quot;id&quot;: &quot;A String&quot;, # Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
      &quot;integerOptions&quot;: { # Options for the Integer field type. # Integer field options.
        &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
        &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
      },
      &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle of this field.
        &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
          &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
        },
        &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
      },
      &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this field.
        &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
      },
      &quot;properties&quot;: { # The basic properties of the field. # The basic properties of the field.
        &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
        &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
        &quot;required&quot;: True or False, # Whether the field should be marked as required.
      },
      &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;queryKey&quot;: &quot;A String&quot;, # Output only. The key to use when constructing Drive search queries to find files based on values defined for this field on files. For example, &quot;`{query_key}` &gt; 2001-01-01&quot;.
      &quot;schemaCapabilities&quot;: { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        &quot;canDelete&quot;: True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        &quot;canDisable&quot;: True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        &quot;canEnable&quot;: True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        &quot;canUpdate&quot;: True or False, # Whether the user can change this field.
      },
      &quot;selectionOptions&quot;: { # Options for the selection field type. # Selection field options.
        &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
              &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
              &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
            },
            &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
            &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
              &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
              &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
              &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
              &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
              },
              &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
            },
            &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
              &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
            },
            &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
              &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              &quot;description&quot;: &quot;A String&quot;, # The description of this label.
              &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
              &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
              &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
              &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
              &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
            },
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
            &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
          },
        ],
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
      &quot;textOptions&quot;: { # Options for the Text field type. # Text field options.
        &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
        &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
      },
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this field was updated.
      &quot;updater&quot;: { # Information about a user. # Output only. The user who modified this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;userOptions&quot;: { # Options for the user field type. # User field options.
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  &quot;id&quot;: &quot;A String&quot;, # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;labelType&quot;: &quot;A String&quot;, # Required. The type of label.
  &quot;learnMoreUri&quot;: &quot;A String&quot;, # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle state of the label including whether it&#x27;s published, deprecated, and has draft changes.
    &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
      &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
    },
    &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
  },
  &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this label.
    &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  &quot;properties&quot;: { # Basic properties of the label. # Required. The basic properties of the label.
    &quot;description&quot;: &quot;A String&quot;, # The description of the label.
    &quot;title&quot;: &quot;A String&quot;, # Required. Title of the label.
  },
  &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this label was published. This value has no meaning when the label isn&#x27;t published.
  &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label isn&#x27;t published.&gt;&gt;
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The time this label revision was created.
  &quot;revisionCreator&quot;: { # Information about a user. # Output only. The user who created this label revision.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionId&quot;: &quot;A String&quot;, # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;schemaCapabilities&quot;: { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    &quot;canDelete&quot;: True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    &quot;canDisable&quot;: True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    &quot;canEnable&quot;: True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    &quot;canUpdate&quot;: True or False, # Whether the user can change this label.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="updateLabelEnabledAppSettings">updateLabelEnabledAppSettings(name, body=None, x__xgafv=None)</code>
  <pre>Updates a label&#x27;s `EnabledAppSettings`. Enabling a label in a Google Workspace app allows it to be used in that app. This change isn&#x27;t revisioned, doesn&#x27;t require publishing, and takes effect immediately.

Args:
  name: string, Required. The resource name of the label to update. The resource name of the label to update. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to update the `EnabledAppSettings` of the given label. This change is not revisioned, doesn&#x27;t require publishing, and takes effect immediately. \
  &quot;enabledAppSettings&quot;: { # Describes the Google Workspace apps in which the label can be used. # Required. The new `EnabledAppSettings` value for the label.
    &quot;enabledApps&quot;: [ # Optional. The list of apps where the label can be used.
      { # An app where the label can be used.
        &quot;app&quot;: &quot;A String&quot;, # Optional. The name of the app.
      },
    ],
  },
  &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.
  &quot;useAdminAccess&quot;: True or False, # Optional. Set to `true` in order to use the user&#x27;s admin credentials. The server will verify the user is an admin for the label before allowing access.
  &quot;view&quot;: &quot;A String&quot;, # Optional. When specified, only certain fields belonging to the indicated view will be returned.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A label defines a taxonomy that can be applied to Drive items in order to organize and search across items. Labels can be simple strings, or can contain fields that describe additional metadata that can be further used to organize and search Drive items.
  &quot;appliedCapabilities&quot;: { # The capabilities a user has on this label&#x27;s applied metadata. # Output only. The capabilities related to this label on applied metadata.
    &quot;canApply&quot;: True or False, # Whether the user can apply this label to items.
    &quot;canRead&quot;: True or False, # Whether the user can read applied metadata related to this label.
    &quot;canRemove&quot;: True or False, # Whether the user can remove this label from items.
  },
  &quot;appliedLabelPolicy&quot;: { # Behavior of this label when it&#x27;s applied to Drive items. # Output only. Behavior of this label when it&#x27;s applied to Drive items.
    &quot;copyMode&quot;: &quot;A String&quot;, # Indicates how the applied label and field values should be copied when a Drive item is copied.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this label was created.
  &quot;creator&quot;: { # Information about a user. # Output only. The user who created this label.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;customer&quot;: &quot;A String&quot;, # Output only. The customer this label belongs to. For example: `customers/123abc789`.
  &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this label was disabled. This value has no meaning when the label isn&#x27;t disabled.
  &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this label. This value has no meaning when the label isn&#x27;t disabled.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;displayHints&quot;: { # The UI display hints for rendering the label. # Output only. UI display hints for rendering the label.
    &quot;disabled&quot;: True or False, # Whether the label should be shown in the UI as disabled.
    &quot;hiddenInSearch&quot;: True or False, # This label should be hidden in the search menu when searching for Drive items.
    &quot;priority&quot;: &quot;A String&quot;, # The order to display labels in a list.
    &quot;shownInApply&quot;: True or False, # This label should be shown in the apply menu when applying values to a Drive item.
  },
  &quot;enabledAppSettings&quot;: { # Describes the Google Workspace apps in which the label can be used. # Optional. The `EnabledAppSettings` for this Label.
    &quot;enabledApps&quot;: [ # Optional. The list of apps where the label can be used.
      { # An app where the label can be used.
        &quot;app&quot;: &quot;A String&quot;, # Optional. The name of the app.
      },
    ],
  },
  &quot;fields&quot;: [ # List of fields in descending priority order.
    { # Defines a field that has a display name, data type, and other configuration options. This field defines the kind of metadata that may be set on a Drive item.
      &quot;appliedCapabilities&quot;: { # The capabilities related to this field on applied metadata. # Output only. The capabilities this user has on this field and its value when the label is applied on Drive items.
        &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
        &quot;canSearch&quot;: True or False, # Whether the user can search for Drive items referencing this field.
        &quot;canWrite&quot;: True or False, # Whether the user can set this field on Drive items.
      },
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this field was created.
      &quot;creator&quot;: { # Information about a user. # Output only. The user who created this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;dateOptions&quot;: { # Options for the date field type. # Date field options.
        &quot;dateFormat&quot;: &quot;A String&quot;, # Output only. ICU date format.
        &quot;dateFormatType&quot;: &quot;A String&quot;, # Localized date formatting option. Field values are rendered in this format according to their locale.
        &quot;maxValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Maximum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;minValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Minimum valid value (year, month, day).
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this field was disabled. This value has no meaning when the field is not disabled.
      &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this field. This value has no meaning when the field is not disabled.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;displayHints&quot;: { # UI display hints for rendering a field. # Output only. UI display hints for rendering a field.
        &quot;disabled&quot;: True or False, # Whether the field should be shown in the UI as disabled.
        &quot;hiddenInSearch&quot;: True or False, # This field should be hidden in the search menu when searching for Drive items.
        &quot;required&quot;: True or False, # Whether the field should be shown as required in the UI.
        &quot;shownInApply&quot;: True or False, # This field should be shown in the apply menu when applying values to a Drive item.
      },
      &quot;id&quot;: &quot;A String&quot;, # Output only. The key of a field, unique within a label or library. This value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
      &quot;integerOptions&quot;: { # Options for the Integer field type. # Integer field options.
        &quot;maxValue&quot;: &quot;A String&quot;, # Output only. The maximum valid value for the integer field.
        &quot;minValue&quot;: &quot;A String&quot;, # Output only. The minimum valid value for the integer field.
      },
      &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle of this field.
        &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
          &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
          &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
        },
        &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
        &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
      },
      &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this field.
        &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
      },
      &quot;properties&quot;: { # The basic properties of the field. # The basic properties of the field.
        &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
        &quot;insertBeforeField&quot;: &quot;A String&quot;, # Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list.
        &quot;required&quot;: True or False, # Whether the field should be marked as required.
      },
      &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this field. This value has no meaning when the field is not published.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;queryKey&quot;: &quot;A String&quot;, # Output only. The key to use when constructing Drive search queries to find files based on values defined for this field on files. For example, &quot;`{query_key}` &gt; 2001-01-01&quot;.
      &quot;schemaCapabilities&quot;: { # The capabilities related to this field when editing the field. # Output only. The capabilities this user has when editing this field.
        &quot;canDelete&quot;: True or False, # Whether the user can delete this field. The user must have permission and the field must be deprecated.
        &quot;canDisable&quot;: True or False, # Whether the user can disable this field. The user must have permission and this field must not already be disabled.
        &quot;canEnable&quot;: True or False, # Whether the user can enable this field. The user must have permission and this field must be disabled.
        &quot;canUpdate&quot;: True or False, # Whether the user can change this field.
      },
      &quot;selectionOptions&quot;: { # Options for the selection field type. # Selection field options.
        &quot;choices&quot;: [ # The options available for this selection field. The list order is consistent, and modified with `insert_before_choice`.
          { # Selection field choice.
            &quot;appliedCapabilities&quot;: { # The capabilities related to this choice on applied metadata. # Output only. The capabilities related to this choice on applied metadata.
              &quot;canRead&quot;: True or False, # Whether the user can read related applied metadata on items.
              &quot;canSearch&quot;: True or False, # Whether the user can use this choice in search queries.
              &quot;canSelect&quot;: True or False, # Whether the user can select this choice on an item.
            },
            &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time this choice was created.
            &quot;creator&quot;: { # Information about a user. # Output only. The user who created this choice.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;disableTime&quot;: &quot;A String&quot;, # Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
            &quot;disabler&quot;: { # Information about a user. # Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;displayHints&quot;: { # UI display hints for rendering an option. # Output only. UI display hints for rendering a choice.
              &quot;badgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The colors to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;badgePriority&quot;: &quot;A String&quot;, # The priority of this badge. Used to compare and sort between multiple badges. A lower number means the badge should be shown first. When a badging configuration is not present, this will be 0. Otherwise, this will be set to `BadgeConfig.priority_override` or the default heuristic which prefers creation date of the label, and field and option priority.
              &quot;darkBadgeColors&quot;: { # The color derived from BadgeConfig and changed to the closest recommended supported color. # The dark-mode color to use for the badge. Changed to Google Material colors based on the chosen `properties.badge_config.color`.
                &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge background that pairs with the foreground.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;foregroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Badge foreground that pairs with the background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;soloColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Output only. Color that can be used for text without a background.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
              },
              &quot;disabled&quot;: True or False, # Whether the option should be shown in the UI as disabled.
              &quot;hiddenInSearch&quot;: True or False, # This option should be hidden in the search menu when searching for Drive items.
              &quot;shownInApply&quot;: True or False, # This option should be shown in the apply menu when applying values to a Drive item.
            },
            &quot;id&quot;: &quot;A String&quot;, # The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
            &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. Lifecycle of the choice.
              &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
                &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
                &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
              },
              &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
              &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
            },
            &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this choice.
              &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
            },
            &quot;properties&quot;: { # Basic properties of the choice. # Basic properties of the choice.
              &quot;badgeConfig&quot;: { # Badge status of the label. # The badge configuration for this choice. When set, the label that owns this choice is considered a &quot;badged label&quot;.
                &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The color of the badge. When not specified, no badge is rendered. The background, foreground, and solo (light and dark mode) colors set here are changed in the Drive UI into the closest recommended supported color.
                  &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                  &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                  &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                  &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                },
                &quot;priorityOverride&quot;: &quot;A String&quot;, # Override the default global priority of this badge. When set to 0, the default priority heuristic is used.
              },
              &quot;description&quot;: &quot;A String&quot;, # The description of this label.
              &quot;displayName&quot;: &quot;A String&quot;, # Required. The display text to show in the UI identifying this field.
              &quot;insertBeforeChoice&quot;: &quot;A String&quot;, # Input only. Insert or move this choice before the indicated choice. If empty, the choice is placed at the end of the list.
            },
            &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this choice was published. This value has no meaning when the choice is not published.
            &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this choice. This value has no meaning when the choice is not published.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
            &quot;schemaCapabilities&quot;: { # The capabilities related to this choice when editing the choice. # Output only. The capabilities related to this option when editing the option.
              &quot;canDelete&quot;: True or False, # Whether the user can delete this choice.
              &quot;canDisable&quot;: True or False, # Whether the user can disable this choice.
              &quot;canEnable&quot;: True or False, # Whether the user can enable this choice.
              &quot;canUpdate&quot;: True or False, # Whether the user can update this choice.
            },
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this choice was updated last.
            &quot;updater&quot;: { # Information about a user. # Output only. The user who updated this choice last.
              &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
            },
          },
        ],
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
      &quot;textOptions&quot;: { # Options for the Text field type. # Text field options.
        &quot;maxLength&quot;: 42, # Output only. The maximum valid length of values for the text field.
        &quot;minLength&quot;: 42, # Output only. The minimum valid length of values for the text field.
      },
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time this field was updated.
      &quot;updater&quot;: { # Information about a user. # Output only. The user who modified this field.
        &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
      },
      &quot;userOptions&quot;: { # Options for the user field type. # User field options.
        &quot;listOptions&quot;: { # Options for a multi-valued variant of an associated field type. # When specified, indicates that this field supports a list of values. Once the field is published, this cannot be changed.
          &quot;maxEntries&quot;: 42, # Maximum number of entries permitted.
        },
      },
    },
  ],
  &quot;id&quot;: &quot;A String&quot;, # Output only. Globally unique identifier of this label. ID makes up part of the label `name`, but unlike `name`, ID is consistent between revisions. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;labelType&quot;: &quot;A String&quot;, # Required. The type of label.
  &quot;learnMoreUri&quot;: &quot;A String&quot;, # Custom URL to present to users to allow them to learn more about this label and how it should be used.
  &quot;lifecycle&quot;: { # The lifecycle state of an object, such as label, field, or choice. For more information, see [Label lifecycle](https://developers.google.com/workspace/drive/labels/guides/label-lifecycle). The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `UNPUBLISHED_DRAFT` -&gt; `PUBLISHED` * `UNPUBLISHED_DRAFT` -&gt; (Deleted) * `PUBLISHED` -&gt; `DISABLED` * `DISABLED` -&gt; `PUBLISHED` * `DISABLED` -&gt; (Deleted) The published and disabled states have some distinct characteristics: * `Published`: Some kinds of changes might be made to an object in this state, in which case `has_unpublished_changes` will be true. Also, some kinds of changes aren&#x27;t permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the label are rejected. * `Disabled`: When disabled, the configured `DisabledPolicy` takes effect. # Output only. The lifecycle state of the label including whether it&#x27;s published, deprecated, and has draft changes.
    &quot;disabledPolicy&quot;: { # The policy that governs how to treat a disabled label, field, or selection choice in different contexts. # The policy that governs how to show a disabled label, field, or selection choice.
      &quot;hideInSearch&quot;: True or False, # Whether to hide this disabled object in the search menu for Drive items. * When `false`, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. * When `true`, the object is generally hidden in the UI when searching for Drive items.
      &quot;showInApply&quot;: True or False, # Whether to show this disabled object in the apply menu on Drive items. * When `true`, the object is generally shown in the UI as disabled and is unselectable. * When `false`, the object is generally hidden in the UI.
    },
    &quot;hasUnpublishedChanges&quot;: True or False, # Output only. Whether the object associated with this lifecycle has unpublished changes.
    &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the object associated with this lifecycle.
  },
  &quot;lockStatus&quot;: { # Contains information about whether a label component should be considered locked. # Output only. The `LockStatus` of this label.
    &quot;locked&quot;: True or False, # Output only. Indicates whether this label component is the (direct) target of a label lock. A label component can be implicitly locked even if it&#x27;s not the direct target of a label lock, in which case this field is set to false.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the label. Will be in the form of either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the request. See `id` and `revision_id` below.
  &quot;properties&quot;: { # Basic properties of the label. # Required. The basic properties of the label.
    &quot;description&quot;: &quot;A String&quot;, # The description of the label.
    &quot;title&quot;: &quot;A String&quot;, # Required. Title of the label.
  },
  &quot;publishTime&quot;: &quot;A String&quot;, # Output only. The time this label was published. This value has no meaning when the label isn&#x27;t published.
  &quot;publisher&quot;: { # Information about a user. # Output only. The user who published this label. This value has no meaning when the label isn&#x27;t published.&gt;&gt;
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The time this label revision was created.
  &quot;revisionCreator&quot;: { # Information about a user. # Output only. The user who created this label revision.
    &quot;person&quot;: &quot;A String&quot;, # The identifier for this user that can be used with the [People API](https://developers.google.com/people) to get more information. For example, `people/12345678`.
  },
  &quot;revisionId&quot;: &quot;A String&quot;, # Output only. Revision ID of the label. Revision ID might be part of the label `name` depending on the request issued. A new revision is created whenever revisioned properties of a label are changed. Matches the regex: `([a-zA-Z0-9])+`.
  &quot;schemaCapabilities&quot;: { # The capabilities related to this label when editing the label. # Output only. The capabilities the user has on this label.
    &quot;canDelete&quot;: True or False, # Whether the user can delete this label. The user must have permission and the label must be disabled.
    &quot;canDisable&quot;: True or False, # Whether the user can disable this label. The user must have permission and this label must not already be disabled.
    &quot;canEnable&quot;: True or False, # Whether the user can enable this label. The user must have permission and this label must be disabled.
    &quot;canUpdate&quot;: True or False, # Whether the user can change this label.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="updatePermissions">updatePermissions(parent, body=None, useAdminAccess=None, x__xgafv=None)</code>
  <pre>Updates a label&#x27;s permissions. If a permission for the indicated principal doesn&#x27;t exist, a label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren&#x27;t revisioned, and don&#x27;t require publishing.

Args:
  parent: string, Required. The parent label resource name. (required)
  body: object, The request body.
    The object takes the form of:

{ # The permission that applies to a principal (user, group, audience) on a label.
  &quot;audience&quot;: &quot;A String&quot;, # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the label.
  &quot;email&quot;: &quot;A String&quot;, # Specifies the email address for a user or group principal. Not populated for audience principals. User and group permissions may only be inserted using an email address. On update requests, if email address is specified, no principal should be specified.
  &quot;group&quot;: &quot;A String&quot;, # Group resource name.
  &quot;name&quot;: &quot;A String&quot;, # Resource name of this permission.
  &quot;person&quot;: &quot;A String&quot;, # Person resource name.
  &quot;role&quot;: &quot;A String&quot;, # The role the principal should have.
}

  useAdminAccess: boolean, Set to `true` in order to use the user&#x27;s admin credentials. The server will verify the user is an admin for the label before allowing access.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The permission that applies to a principal (user, group, audience) on a label.
  &quot;audience&quot;: &quot;A String&quot;, # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the label.
  &quot;email&quot;: &quot;A String&quot;, # Specifies the email address for a user or group principal. Not populated for audience principals. User and group permissions may only be inserted using an email address. On update requests, if email address is specified, no principal should be specified.
  &quot;group&quot;: &quot;A String&quot;, # Group resource name.
  &quot;name&quot;: &quot;A String&quot;, # Resource name of this permission.
  &quot;person&quot;: &quot;A String&quot;, # Person resource name.
  &quot;role&quot;: &quot;A String&quot;, # The role the principal should have.
}</pre>
</div>

</body></html>